ATSUGetSoftLineBreaks

Obtains all soft line breaks in a range of text.

OSStatus ATSUGetSoftLineBreaks (
                     ATSUTextLayout iTextLayout,
                     UniCharArrayOffset iRangeStart,
                     UniCharCount iRangeLength,
                     ItemCount iMaximumBreaks,
                     UniCharArrayOffset oBreaks[],
                     ItemCount *oBreakCount);
iTextLayout
A reference of type ATSUTextLayout. Pass a reference to an initialized text layout object. You cannot pass NULL for this parameter.

iRangeStart
A value of type UniCharArrayOffset. Pass the edge offset of the beginning of the range of text whose soft line break positions you want to obtain. To indicate the beginning of the text buffer, pass the constant kATSUFromTextBeginning, described in Text Offset Constant. To indicate the entire text buffer, pass kATSUFromTextBeginning in this parameter and the constant kATSUToTextEnd in the iRangeLength parameter. If the offset is outside the text buffer, ATSUGetSoftLineBreaks returns the result code kATSUInvalidTextRangeErr.

iRangeLength
A value of type UniCharCount. Pass the length of the range of text whose soft line break positions you want to obtain. To indicate the end of the text buffer, pass the constant kATSUToTextEnd, described in Text Length Constant. To indicate the entire text buffer, pass kATSUToTextEnd in this parameter and the constant kATSUFromTextBeginning in the iRangeStart parameter. If the range of text is outside the text buffer, ATSUGetSoftLineBreaks returns the result code kATSUInvalidTextRangeErr.

iMaximumBreaks
The maximum number of soft line breaks you want to obtain. Typically, this is equivalent to the number of elements in the oBreaks array. To determine this value, see the discussion below.

oBreaks
An array of values of type UniCharArrayOffset. Before calling ATSUGetSoftLineBreaks, pass a pointer to memory that you have allocated for this array. If you are uncertain of how much memory to allocate, see the discussion below. On return, the array contains all the soft line breaks in the range of text.

oBreakCount
A pointer to a count. On return, the actual number of soft line breaks in the range of text. This may be greater than the value passed in the iMaximumBreaks parameter. You cannot pass NULL for this parameter.

function result
A result code. See Result Codes.
DISCUSSION
The ATSUGetSoftLineBreaks function obtains all the soft line breaks that have been set in a range of text.

VERSION NOTES
Available beginning with ATSUI 1.0.


© 2000 Apple Computer, Inc. – (Last Updated 25 Jan 00)